GBML manual / Motion

move_to

Moves instantly to (x, y) - no gradual travel, no collision check.

Syntax

move_to(x, y)

Arguments

NameType
xreal
yreal

Returns

Nothing.

Description

Moves instantly to (x, y) - no gradual travel, no collision check. Purely kinematic: unlike move_slide/move_bounce, this never consults the room's own collision at all, so it is the same kind of move as writing x/y directly, just spelled as one destination instead of two separate fields.

(x, y) is a place in the room, counted from the room's top-left corner, the same way x and y themselves are counted.

Example

move_to(x + 16, y);

Jumps the bolt 16 pixels to the right of wherever it currently is - instantly, with nothing checked along the way, unlike move_step below.

A real capture - the bolt at its starting positionA real capture - the bolt at its starting position
A real capture - the bolt at its starting position
The same bolt after move_to - jumped instantly to the right, nothing in between drawnThe same bolt after move_to - jumped instantly to the right, nothing in between drawn
The same bolt after move_to - jumped instantly to the right, nothing in between drawn

On the GBA

Purely kinematic - it never consults the room’s collision at all, unlike move_slide/move_bounce below.

See also: move_stepmove_slide